package com.zzx.boot.exception;

import com.zzx.boot.constant.GlobalEnum;
import lombok.Data;

/**
 * @author tan
 * @version 1.0
 * @date 2023/7/7 21:06
 */

@Data
public class SystemctlException extends RuntimeException {

    private Integer code;
    private String message;

    public SystemctlException(Integer code,String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public SystemctlException(GlobalEnum e) {
        super(e.getMsg());
        this.code = e.getCode();
        this.message = e.getMsg();
    }
}
